from TollAll import tool
from net_project_zizhu.zizhuArticlePage import zizhuArticlePage
import user_data
import unittest
import warnings
from time import sleep

from test_case.net_article_test import NetArticleTest


class zizhuArticle(unittest.TestCase,tool,):


    def setUp(self):
        warnings.simplefilter('ignore', ResourceWarning)

    def tearDown(self):
        self.page.logout()

    def test(self):
        """文章工具"""
        # self.Worksend()     自主选课这次改版，该工具与远程不一致  8月31
        self.page = zizhuArticlePage()
        self.page.login(*user_data.zizhu_student)
        self.page.enter_project()
        self.page.enter_tools('文章')
        self.page.CaoG()    #草稿
        self.page.release_article()

    def test_ping(self):
        self.page = zizhuArticlePage()
        self.page.login(*user_data.zizhu_project_admin)
        self.page.enter_project()
        self.page.enter_tools('文章')
        self.page.view_comment_article()


if __name__ == '__main__':
    unittest.main()
